//
//  MKOrderObject.h
//  YangDongXi
//
//  Created by cocoa on 15/4/16.
//  Copyright (c) 2015年 cocoa. All rights reserved.
//

//
#import "MKInvoiceInfo.h"
#import "MKConsigneeObject.h"
#import "MKDeliveryInfo.h"
#import "MKCouponObject.h"
#import "MKOrderItemObject.h"
#import "MKSellerObject.h"
#import "MKPaymentInfo.h"
#import "MKWealthAcountInfo.h"
#import "MKOrderDiscountObject.h"
#import "MKStoresObject.h"
#import "MKInformationObject.h"
#define MKOrderStatusChangedNotification @"MKOrderStatusChangedNotification"

typedef NS_ENUM(NSInteger, MKOrderStatus)
{
    MKOrderStatusUnpaid         = 10,   /**< 未支付*/
    MKOrderStatusCanceled       = 20,   /**< 已取消*/
    MKOrderStatusSellerCancel   = 21,   /**< 卖家已取消*/
    MKOrderStatusPaid           = 30,   /**< 已支付*/
    MKOrderStatusDeliveried     = 40,   /**< 已发货*/
    MKOrderStatusSignOff        = 50,   /**< 已签收*/
    MKOrderStatusGoodsFailed    = 51,   /**< 收货失败*/
    MKOrderStatusAppraised      = 60,   /**< 已评价*/
    MKOrderStatusRefundApply    = 70,   /**< 退款中*/
    MKOrderStatusRefundRefund   = 71,   /**< 卖家拒绝退款*/
    MKOrderStatusRefundGoods    = 72,   /**< 卖家拒绝退货*/
    MKOrderStatusAgreeRefund    = 73,   /*同意退款*/
    MKOrderStatusAgreeGoods     = 74,   /*同意退货*/
    MKOrderStatusRefundFinished = 80,   /**< 退款完成*/
    MKOrderStatusOrderEnd       = 81,   /**< 订单结束*/
};

typedef NS_ENUM(NSInteger, MKOrderItemSource)
{
    MKOrderItemSourceOther = 0,             /**< 其他*/
    MKOrderItemSourceShoppingCart = 1,      /**< 购物车*/
    MKOrderItemSourceImmediatelyBuy = 2,    /**< 立即购买*/
};

@interface MKOrderObject : MKBaseObject

/**@brief 订单唯一id*/
@property (nonatomic, strong) NSString *orderUid;

/**@brief 订单序列号*/
@property (nonatomic, strong) NSString *orderSn;

/**@brief 下单商品信息, MKOrderItemObject对象数组*/
@property (nonatomic, strong) NSArray *orderItems;

/**@brief 卖家信息*/
@property (nonatomic, strong) MKSellerObject *seller;

/**@brief 是否需要发票*/
@property (nonatomic, assign) BOOL isInvoice;

/**@brief 发票信息*/
@property (nonatomic, strong) MKInvoiceInfo *invoice;

/**@brief 用户备注*/
@property (nonatomic, strong) NSString *userMemo;

/**@brief 订单状态*/
@property (nonatomic, assign) MKOrderStatus orderStatus;

/**@brief 订单总金额*/
@property (nonatomic, assign) NSInteger totalPrice;

/**@brief 运费*/
@property (nonatomic, assign) float deliveryFee;

/**@brief 订单优惠后金额*/
@property (nonatomic, assign) NSInteger totalAmount;

/**@brief 收货信息*/
@property (nonatomic, strong) MKConsigneeObject *consignee;

/**@brief 配送信息*/
@property (nonatomic, strong) NSArray *deliveryInfo;

/**@brief 支付信息*/
@property (nonatomic, strong) MKPaymentInfo *paymentInfo;

/**@brief 订单优惠信息列表*/
@property (nonatomic, strong) NSArray *discountInfo;

/**@brief 订单使用优惠券列表*/
@property (nonatomic, strong) NSArray *couponItems;

/**@brief 订单使用的虚拟财富列表*/
@property (nonatomic, strong) NSArray *wealthItems;

/**@brief 支付方式id*/
@property (nonatomic, assign) NSInteger paymentId;

/**@brief 配送方式id*/
@property (nonatomic, assign) NSInteger deliveryId;

/**@brief 下单时间*/
@property (nonatomic, strong) NSString *orderTime;

/**@brief 支付时间*/
@property (nonatomic, strong) NSString *payTime;

/**@brief 发货时间*/
@property (nonatomic, strong) NSString *consignTime;

/**@brief 收货时间*/
@property (nonatomic, strong) NSString *receiptTime;

@property (nonatomic, strong) NSString *requireTimeShow;
@property (nonatomic, strong) NSString *deliveryMan;

@property (nonatomic, assign) NSInteger totalAddTax;


@property (nonatomic, strong) NSString *itemType;

@property (nonatomic, assign) NSInteger isOverSea;

/**@brief 商品来源*/
@property (nonatomic, assign) MKOrderItemSource orderItemSource;


/**
 @brief 预约时间
 @discussion
 */
@property (nonatomic,strong)NSString *pickupTime;
@property (nonatomic,strong)NSString *storesObject;
/**
 @brief 门店信息
 @discussion
 */
@property (nonatomic,strong)MKInformationObject *store;
@property (nonatomic,strong)NSString *attachInfo;


@property (nonatomic,assign)NSInteger cellrow;
+ (NSString *)textForStatus:(MKOrderStatus)status;

@end
